package com.zmn.plat.persistence.interfaces.channel.workorder.video;

import com.zmn.plat.model.entity.channel.workorder.video.ChannelWorkOrderVideo;
import com.zmn.plat.model.entity.channel.workorder.video.ChannelWorkOrderVideoQuery;

import java.util.List;


/**
 * 渠道-工单视频
 *
 * @author yangshuangping
 * @since 2021-06-07 16:54:03
 */
public interface ChannelWorkOrderVideoDao {


    /**
     * 分页搜索
     *
     * @param query 条件
     * @return 列表
     */
    List<ChannelWorkOrderVideo> listPageByQuery(ChannelWorkOrderVideoQuery query);

    /**
     * 搜索
     *
     * @param query 条件
     * @return
     */
    List<ChannelWorkOrderVideo> listByQuery(ChannelWorkOrderVideoQuery query);

    /**
     * 查询
     *
     * @param id ID
     * @return
     */
    ChannelWorkOrderVideo findByKey(Integer id);

    /**
     * 查询最大的排序
     *
     * @return
     */
    Integer findMaxSort();

    /**
     * 统计
     *
     * @param query 条件
     * @return
     */
    Integer countByQuery(ChannelWorkOrderVideoQuery query);

    /**
     * 更新
     *
     * @param video
     * @return
     */
    Integer updateByKey(ChannelWorkOrderVideo video);

    /**
     * 插入
     *
     * @param video
     * @return
     */
    Integer insert(ChannelWorkOrderVideo video);

    /**
     * 删除
     *
     * @param id ID
     * @return
     */
    Integer deleteByKey(Integer id);

    /**
     * 根据渠道ID删除工单视频
     *
     * @param channelId
     */
    Integer deleteByChannelId(Integer channelId);

    /**
     * 描述: 从旧渠道复制到新渠道
     *
     * @param originalChannelId 原渠道ID
     * @param targetChannelId   新渠道ID
     * @param operator          操作者
     * @return java.lang.Boolean
     * @author guoqiao
     * @since 2021/6/8 13:49
     */
    void copy(Integer originalChannelId, Integer targetChannelId, String operator);

}
